import 'package:dio/dio.dart';
import 'package:retrofit/http.dart';

import '../../models/base_result.dart';
import '../../models/login_entity.dart';
import '../dio_client.dart';

part 'api_service.g.dart';

@RestApi(baseUrl: "http://192.168.50.112:8000/")
abstract class ApiService {
  factory ApiService({Dio? dio, String? baseUrl}) {
    return _ApiService(DioClient().dio, baseUrl: baseUrl);
  }

  /// 获取用户信息
  @POST('/auth/v1/login')
  Future<BaseResult<LoginEntity>> userLogin(@Field() String userphone, @Field() String password);
}

